vcNavAgent
A navigation agent that can navigate within the navigation mesh defined by vcNavUnit. Navigation agents can be instructed to automatically or manually steer to target positions. When steered automatically, the agent will compute a path and follow it to the target while avoiding other agents. When steered manually, the agent will attempt to move directly toward the target position without pathfinding or avoidance.
See in: Overview
Module: vcCore
Parent: vcObject
Children -
Referenced by: vcNavUnit.Agents, vcNavUnit.createAgent()
Properties
Learn how to use properties here. The properties are also inherited from the parent class.
| Name | Type | Access | Description |
| AvoidanceQuality | vcAvoidanceQuality | RW | Gets or sets the avoidance quality setting for the agent. The higher the quality the higher the CPU depand but improved avoidance behavior in dense crowds. |
| CollisionQueryRange | Real | RW | Gets or sets the collision query range of the agent [mm]. |
| CornerAssistWeight | Real | RW | Gets or sets a slow down multiplier how agressively the agent will slow down when cornering. Must be positive value. Default is 1.0. |
| DeadLockTimeout | Real | RW | Gets or sets time in seconds to consider the agent is in deadlock and when the event is raised. Defaults to 15.0 s. |
| Height | Real | RW | Gets or sets the height of the navigation agent [mm]. |
| IsAtTarget | Boolean | R | Gets whether the agent has reached its target or has no target. |
| MaxAcceleration | Real | RW | Gets or sets the maximum acceleration of the agent [mm/s^2]. |
| MaxAngularAcceleration | Real | RW | Gets or sets the maximum angular acceleration of the agent [deg/s^2]. Used by manual steering. |
| MaxAngularVelocity | Real | RW | Gets or sets the maximum angular velocity of the agent [deg/s]. |
| MaxVelocity | Real | RW | Gets or sets the maximum velocity of the agent [mm/s]. |
| PathCorners | list[vcVector] | R | Gets the current path corners of the navigation agent. |
| ProximityAssistWeight | Real | RW | Gets or sets a slow down multiplier how agressively the agent will slow down if another slower nearby agent is in the front sector of this agent. Valid range [0...1]. Default is 1.0. |
| Radius | Real | RW | Gets or sets the radius of the navigation agent [mm]. |
| SeparationWeight | Real | RW | Gets or sets the separation weight of the agent. |
| TurnInPlaceThreshold | Real | RW | Gets or sets the turn-in-place threshold angle [degrees].See moreThe threshold determines the angle which requires turning in place before starting auto steer movement. |
| Velocity | Real | R | Gets the current velocity [mm/s]. |
Methods
Learn how to use methods here. The methods are also inherited from the parent class.
| Name | Return Type | Parameters | Description |
| autoSteerTo | Boolean | vcVector position, Optional Keyword[heading = Real] | Automatically navigates and steers the agent to the specified position.See moreParameters: position (vcVector): The target position to steer the agent to. heading (float | None): The final heading angle to orient the agent. None to ignore heading. Returns: bool: A boolean value indicating whether the operation was started successfully. |
| delete | None | None | Removes the navigation agent from the simulation.See moreThe agent will be removed immediately and cannot be used after this call. Parameters: None Returns: None Exceptions: TypeError: Internal error. |
| manualSteerTo | Boolean | vcVector position, Optional Keyword[heading = Real] | Manually steers the agent toward the specified position and final heading.See moreParameters: position (vcVector): The target position to steer the agent to. heading (float | None): The final heading angle to orient the agent. None to keep current heading. Returns: bool: A boolean value indicating whether the operation was started successfully. |
Events
Learn how to use events here. The events are also inherited from the parent class.
| Name | Parameters | Description |
| OnAreaCrossing | vcNavAgent agent, int | None fromId, int | None toId | Event triggered when a navigation agent is about to cross an area boundary.See moreParameters: agent (vcNavAgent): The navigation agent instance that is crossing an area. fromId (int | None): The ID of the restricted area being exited, or None if not applicable. toId (int | None): The ID of the restricted area being entered, or None if not applicable. |
| OnDeadLock | vcNavAgent agent | Event triggered when a navigation agent is stuck. Typically blocked by other agents. Parameters: agent (vcNavAgent): The navigation agent instance that is in a deadlock. |
| OnTargetReached | vcNavAgent agent | Event triggered when a navigation agent reaches its target. Parameters: agent (vcNavAgent): The navigation agent instance that reached its target. |